using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class HOGIADINHModel : ObjModel<HOGIADINH>, IModelConverter
	{

		#region Constructor

		public HOGIADINHModel()
			: base()
		{
		}

		public HOGIADINHModel(HOGIADINH obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _mahogiadinh;

		private System.String _dienthoai;

		private System.String _diachi;

		private System.String _fax;

		private System.String _khuxom;

		private System.String _email;

		private System.Int32? _kinhte;

		private System.Guid? _maquocgia;

		private System.Guid? _matinhthanh;

		private System.Guid? _maquanhuyen;

		private System.Guid? _maxaphuong;

		private System.Guid? _magiaophan;

		private System.Guid? _magiaohat;

		private System.Guid? _magiaoxu;

		private System.Guid? _magiaoho;

		private System.Guid? _machuho;

		private System.Guid? _mahoancanhkinhte;

		private System.Int32? _hogiadinhid;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAHOGIADINH
		{
			get
			{
				return _mahogiadinh;
			}
			set
			{
				_mahogiadinh = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(20, ErrorMessage= "Value must be under 20 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIENTHOAI
		{
			get
			{
				return _dienthoai;
			}
			set
			{
				_dienthoai = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIACHI
		{
			get
			{
				return _diachi;
			}
			set
			{
				_diachi = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(20, ErrorMessage= "Value must be under 20 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String FAX
		{
			get
			{
				return _fax;
			}
			set
			{
				_fax = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String KHUXOM
		{
			get
			{
				return _khuxom;
			}
			set
			{
				_khuxom = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String EMAIL
		{
			get
			{
				return _email;
			}
			set
			{
				_email = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? KINHTE
		{
			get
			{
				return _kinhte;
			}
			set
			{
				_kinhte = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAQUOCGIA
		{
			get
			{
				return _maquocgia;
			}
			set
			{
				_maquocgia = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MATINHTHANH
		{
			get
			{
				return _matinhthanh;
			}
			set
			{
				_matinhthanh = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAQUANHUYEN
		{
			get
			{
				return _maquanhuyen;
			}
			set
			{
				_maquanhuyen = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAXAPHUONG
		{
			get
			{
				return _maxaphuong;
			}
			set
			{
				_maxaphuong = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOPHAN
		{
			get
			{
				return _magiaophan;
			}
			set
			{
				_magiaophan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOHAT
		{
			get
			{
				return _magiaohat;
			}
			set
			{
				_magiaohat = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOXU
		{
			get
			{
				return _magiaoxu;
			}
			set
			{
				_magiaoxu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOHO
		{
			get
			{
				return _magiaoho;
			}
			set
			{
				_magiaoho = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MACHUHO
		{
			get
			{
				return _machuho;
			}
			set
			{
				_machuho = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAHOANCANHKINHTE
		{
			get
			{
				return _mahoancanhkinhte;
			}
			set
			{
				_mahoancanhkinhte = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? HOGIADINHID
		{
			get
			{
				return _hogiadinhid;
			}
			set
			{
				_hogiadinhid = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(HOGIADINHModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<HOGIADINH>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override HOGIADINH ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator HOGIADINHModel(HOGIADINH obj)
		{
			return new HOGIADINHModel(obj);
		}
		public static implicit operator HOGIADINH(HOGIADINHModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
